# -*- coding: utf-8 -*-
from application import app

from flask_debugtoolbar import DebugToolbarExtension

#
# toolbar = DebugToolbarExtension(app)

'''
拦截器处理 和 错误处理器
'''
from interceptors.Auth import *
from interceptors.errorHandler import *

'''
蓝图
'''
from controllers.index import index_page
from controllers.member import member_page
from controllers.book import book_page
from controllers.parter import parter_page
from controllers.document import document_page
from controllers.template import template_page
from controllers.record import record_page
from controllers.plan import plan_page

app.register_blueprint(index_page, url_prefix="/")
app.register_blueprint(member_page, url_prefix="/member")
app.register_blueprint(book_page, url_prefix="/book")
app.register_blueprint(parter_page, url_prefix="/parter")
app.register_blueprint(document_page, url_prefix="/document")
app.register_blueprint(template_page, url_prefix="/template")
app.register_blueprint(record_page, url_prefix="/record")
app.register_blueprint(plan_page, url_prefix="/plan")

'''
模板函数
'''
from common.libs.UrlManager import UrlManager

app.add_template_global(UrlManager.buildStaticUrl, 'buildStaticUrl')
app.add_template_global(UrlManager.buildUrl, 'buildUrl')
